#ifndef _GOBJECT_H_
#define _GOBJECT_H_
#include "Direct3D.h"
#include "AnimationDef.h"

extern const int TriPointCount;

struct Point3DDef {
	float x;
	float y;
	float z;
};

struct TriangleDef {
	struct Point3DDef Points[3];
};

class gobject
{
	protected:
		D3DXMESHCONTAINER_EX *pMeshRoot;
		D3DXFRAME_EX *pFrameRoot;

		void DrawMesh(D3DXMESHCONTAINER_EX *, IDirect3DDevice9 *);
	public:
		gobject();
		~gobject();
		virtual void Load(const char *, IDirect3DDevice9 *, const char *);
		virtual void Draw(IDirect3DDevice9 *);

		void GenSortPoints(ID3DXMesh *pMesh, struct Point3DDef *GJPoints);
		D3DXMATRIX OriginPosTrans(struct Point3DDef *SortGJPoints);
};

#endif
